<template>
  <view @click="chufa" class="search-view" :style="{'background-color':bgcolor}">
    <view class="search-area" :style="{'border-radius': radius +'px' }">
      <uni-icons type="search" size="25"></uni-icons>
      <text class="placeholder">搜索</text>
    </view>
  </view>
</template>

<script>
  export default {
    name: "my-search",
    props: {
      bgcolor: {
        type: String,
        default: '#aaffff'
      },
      radius : {
        type: Number,
        default: 15
      }
    },
    methods: {
      chufa(){
        this.$emit('zdysj')
      }
    },
    data() {
      return {

      };
    }
  }
</script>

<style lang="scss">
  .search-view {
    display: flex;
    align-items: center;
    height: 50px;
    // background-color: #ffffff;

    .search-area {
      display: flex;
      width: 100%;
      height: 36px;
      line-height: 36px;
      background-color: #c3f9c3;
      // border-radius: 15px;
      align-items: center;
      justify-content: center;
        .placeholder {
          font-size: 15px;
          margin-left: 6px;
        }
    }
  }
</style>
